"""
12假币问题
@author: Lin
@time: 2022/12/28 12:59
"""


def main():
    # one = input("first try:")
    # two = input("second try:")
    # three = input("third try:")
    one = 'ABCD EFGH even'
    two = 'ABCI EFJK up'
    three = 'ABIJ EFGH even'
    a = [one.split(' '), two.split(' '), three.split(' ')]
    l = ['A', 'B', 'C', 'D', 'E', 'F', 'H', 'I', 'J', 'K', 'H', 'I']
    for letter in range(12):
        for result in a:
            if result[2] == 'even' and l[letter] in result[0] + result[1]:
                l[letter] = '1'
    for letter in l:
        if letter !='1':
            for result in a:
                if result[2] == 'up' and letter in result[0]:
                    print(f'{letter} is the counterfeit coin and it is heavy')
                elif result[2] == 'up' and letter in result[1]:
                    print(f'{letter} is the counterfeit coin and it is light')
                elif result[2] == 'down' and letter in result[0]:
                    print(f'{letter} is the counterfeit coin and it is light')
                elif result[2] == 'down' and letter in result[1]:
                    print(f'{letter} is the counterfeit coin and it is heavy')



if __name__ == '__main__':
    main()
